package cn.visu.service;


import cn.visu.bean.User;
import cn.visu.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Collection;
import java.util.List;

/**
 * Created by 程振奇 on 2017/3/13.
 */
@Service
public class UserService {
    @Autowired
    private UserDao userDao;

    public List<User> listUser() {

        return userDao.selectUsers();

    }

    @Transactional
    public void insertUser(User user) {

        userDao.insert(user);


    }


    public User getUserByUserName(String username) {
        return null;
    }

    public Collection<String> findRoles(String username) {
        return null;
    }

    public Collection<String> findPermissions(String username) {
        return null;
    }
}
